<!--
*Author：DGZ
 *Contact：jiduxiong@dagongzao.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/basproject/basicdata/Aps_Bom.jsx此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :details="details"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/basproject/basicdata/Aps_Bom.jsx";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        name: "Aps_Bom",
        setup() {
            const table = ref({
                key: "BomId",
                footer: "Foots",
                cnName: "Bom配置",
                name: "basicdata/Aps_Bom",
                newTabEdit: false,
                url: "/Aps_Bom/",
                sortName: "BomId"
            });
            const editFormFields = ref({"ParentMaterialId":"","MaterialId":"","Qty":"","Remarks":""});
            const editFormOptions = ref([[{"dataKey":"WMS_Material","data":[],"title":"父阶物料","field":"ParentMaterialId","type":"select"},
                               {"dataKey":"WMS_Material","data":[],"title":"产品","field":"MaterialId","type":"select"}],
                              [{"title":"数量","field":"Qty","type":"decimal"}],
                              [{"title":"备注","field":"Remarks","colSize":12,"type":"textarea"}]]);
            const searchFormFields = ref({"ParentMaterialId":""});
            const searchFormOptions = ref([[{"dataKey":"WMS_Material","data":[],"title":"父阶物料","field":"ParentMaterialId","type":"select"}]]);
            const columns = ref([{field:"BomId",title:"ID",type:"bigint",width:180,hidden:true,require:true,showOverflowTooltip:true,align:"left"},
                       {field:"ParentMaterialId",title:"父阶物料",type:"bigint",bind:{ key:"WMS_Material",data:[]},width:110,showOverflowTooltip:true,align:"left"},
                       {field:"MaterialId",title:"产品",type:"bigint",bind:{ key:"WMS_Material",data:[]},width:110,showOverflowTooltip:true,align:"left"},
                       {field:"Qty",title:"数量",type:"decimal",width:110,showOverflowTooltip:true,align:"left"},
                       {field:"IsValid",title:"是否有效",type:"int",width:110,hidden:true,showOverflowTooltip:true,align:"left"},
                       {field:"CreateId",title:"创建用户",type:"bigint",width:80,hidden:true,showOverflowTooltip:true,align:"left"},
                       {field:"Creator",title:"创建人",type:"string",width:100,showOverflowTooltip:true,align:"left"},
                       {field:"CreateTime",title:"创建时间",type:"datetime",width:110,showOverflowTooltip:true,align:"left"},
                       {field:"ModifyId",title:"修改用户",type:"bigint",width:80,hidden:true,showOverflowTooltip:true,align:"left"},
                       {field:"Modifier",title:"修改人",type:"string",width:100,showOverflowTooltip:true,align:"left"},
                       {field:"ModifyTime",title:"修改时间",type:"datetime",width:110,showOverflowTooltip:true,align:"left"},
                       {field:"Remarks",title:"备注",type:"string",width:150,showOverflowTooltip:true,align:"left"}]);
            const detail = ref({columns:[]});
            const details = ref([]);
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
                details
            };
        },
    });
</script>
